<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
    <%
  //设置request对象的编码格式和客户端页面保持一致（解决中文乱码）
    request.setCharacterEncoding("utf-8");
    //前表单控件的name属性的值
    out.print("表单中那么值为："+request.getParameter("txtName")+"<br/>");
    out.write(request.getParameter("txtPsw").toString()+"<br/>");
    
    //获取多元元素控件
    String[] strVals = request.getParameterValues("chHobby");
    for(String str : strVals){
    	out.write(str+"<br/>");
    }
    
    %>
</body>
</html>